package com.pagoda.nerp.web.services;

import com.pagoda.nerp.web.repositories.UserMappingDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author:HXB
 * @Description
 * @Date Create in 11:39 2017/12/29
 * @Modified By
 **/

@Service
public class UserMappingService {
    @Autowired
    private UserMappingDao userMappingDao;

    public String getErpid(String ehrid,String username){
        return userMappingDao.findByEhridAndUsername(ehrid,username).getErpid();
    }

    public String getEhrid(String erpid,String username){
        return userMappingDao.findByErpidAndUsername(erpid, username).getEhrid();
    }
}
